﻿using System;
using System.Collections;
using System.IO;
using Shell32;

namespace PictureSplit
{
	// Token: 0x0200000D RID: 13
	internal class FileInfoClass
	{
		// Token: 0x0600004E RID: 78 RVA: 0x0000519C File Offset: 0x0000419C
		public FileInfoClass(string sFPath)
		{
			if (File.Exists(sFPath))
			{
				ArrayList arrayList = new ArrayList();
				FileInfo fileInfo = new FileInfo(sFPath);
				this.sFileName = fileInfo.Name;
				this.sFullFileName = fileInfo.FullName;
				this.sFileExtension = fileInfo.Extension;
				this.lFileLength = fileInfo.Length;
				this.sFilePath = fileInfo.Directory.ToString();
				this.dCreationDate = fileInfo.CreationTime;
				this.dModificationDate = fileInfo.LastWriteTime;
				arrayList = this.GetDetailedFileInfo(sFPath);
				foreach (DetailedFileInfo detailedFileInfo in arrayList)
				{
					int iD = detailedFileInfo.ID;
					if (iD != 2)
					{
						switch (iD)
						{
						case 9:
							this.sFileAuthor = detailedFileInfo.Value;
							break;
						case 10:
							this.sFileTitle = detailedFileInfo.Value;
							break;
						case 11:
							this.sFileSubject = detailedFileInfo.Value;
							break;
						case 12:
							this.sFileCategory = detailedFileInfo.Value;
							break;
						case 14:
							this.sFileComment = detailedFileInfo.Value;
							break;
						}
					}
					else
					{
						this.sFileType = detailedFileInfo.Value;
					}
				}
				return;
			}
			throw new Exception("The given File does not exist");
		}

		// Token: 0x1700000D RID: 13
		// (get) Token: 0x0600004F RID: 79 RVA: 0x000053A0 File Offset: 0x000043A0
		// (set) Token: 0x06000050 RID: 80 RVA: 0x000053B8 File Offset: 0x000043B8
		public string FileName
		{
			get
			{
				return this.sFileName;
			}
			set
			{
				this.sFileName = value;
			}
		}

		// Token: 0x1700000E RID: 14
		// (get) Token: 0x06000051 RID: 81 RVA: 0x000053C4 File Offset: 0x000043C4
		// (set) Token: 0x06000052 RID: 82 RVA: 0x000053DC File Offset: 0x000043DC
		public string FilePath
		{
			get
			{
				return this.sFilePath;
			}
			set
			{
				this.sFilePath = value;
			}
		}

		// Token: 0x1700000F RID: 15
		// (get) Token: 0x06000053 RID: 83 RVA: 0x000053E8 File Offset: 0x000043E8
		// (set) Token: 0x06000054 RID: 84 RVA: 0x00005400 File Offset: 0x00004400
		public string FullFileName
		{
			get
			{
				return this.sFullFileName;
			}
			set
			{
				this.sFullFileName = value;
			}
		}

		// Token: 0x17000010 RID: 16
		// (get) Token: 0x06000055 RID: 85 RVA: 0x0000540C File Offset: 0x0000440C
		// (set) Token: 0x06000056 RID: 86 RVA: 0x00005424 File Offset: 0x00004424
		public string FileExtension
		{
			get
			{
				return this.sFileExtension;
			}
			set
			{
				this.sFileExtension = value;
			}
		}

		// Token: 0x17000011 RID: 17
		// (get) Token: 0x06000057 RID: 87 RVA: 0x00005430 File Offset: 0x00004430
		// (set) Token: 0x06000058 RID: 88 RVA: 0x00005448 File Offset: 0x00004448
		public long FileSize
		{
			get
			{
				return this.lFileLength;
			}
			set
			{
				this.lFileLength = value;
			}
		}

		// Token: 0x17000012 RID: 18
		// (get) Token: 0x06000059 RID: 89 RVA: 0x00005454 File Offset: 0x00004454
		// (set) Token: 0x0600005A RID: 90 RVA: 0x0000546C File Offset: 0x0000446C
		public long FileVersion
		{
			get
			{
				return this.lFileVersion;
			}
			set
			{
				this.lFileVersion = value;
			}
		}

		// Token: 0x17000013 RID: 19
		// (get) Token: 0x0600005B RID: 91 RVA: 0x00005478 File Offset: 0x00004478
		// (set) Token: 0x0600005C RID: 92 RVA: 0x00005490 File Offset: 0x00004490
		public DateTime FileCreationDate
		{
			get
			{
				return this.dCreationDate;
			}
			set
			{
				this.dCreationDate = value;
			}
		}

		// Token: 0x17000014 RID: 20
		// (get) Token: 0x0600005D RID: 93 RVA: 0x0000549C File Offset: 0x0000449C
		// (set) Token: 0x0600005E RID: 94 RVA: 0x000054B4 File Offset: 0x000044B4
		public DateTime FileModificationDate
		{
			get
			{
				return this.dModificationDate;
			}
			set
			{
				this.dModificationDate = value;
			}
		}

		// Token: 0x17000015 RID: 21
		// (get) Token: 0x0600005F RID: 95 RVA: 0x000054C0 File Offset: 0x000044C0
		public string FileType
		{
			get
			{
				return this.sFileType;
			}
		}

		// Token: 0x17000016 RID: 22
		// (get) Token: 0x06000060 RID: 96 RVA: 0x000054D8 File Offset: 0x000044D8
		public string FileTitle
		{
			get
			{
				return this.sFileTitle;
			}
		}

		// Token: 0x17000017 RID: 23
		// (get) Token: 0x06000061 RID: 97 RVA: 0x000054F0 File Offset: 0x000044F0
		public string FileSubject
		{
			get
			{
				return this.sFileSubject;
			}
		}

		// Token: 0x17000018 RID: 24
		// (get) Token: 0x06000062 RID: 98 RVA: 0x00005508 File Offset: 0x00004508
		public string FileAuthor
		{
			get
			{
				return this.sFileAuthor;
			}
		}

		// Token: 0x17000019 RID: 25
		// (get) Token: 0x06000063 RID: 99 RVA: 0x00005520 File Offset: 0x00004520
		public string FileCategory
		{
			get
			{
				return this.sFileCategory;
			}
		}

		// Token: 0x1700001A RID: 26
		// (get) Token: 0x06000064 RID: 100 RVA: 0x00005538 File Offset: 0x00004538
		public string FileComment
		{
			get
			{
				return this.sFileComment;
			}
		}

		// Token: 0x06000065 RID: 101 RVA: 0x00005550 File Offset: 0x00004550
		private ArrayList GetDetailedFileInfo(string sFile)
		{
			ArrayList arrayList = new ArrayList();
			if (sFile.Length > 0)
			{
				try
				{
					ShellClass shellClass = new ShellClass();
					Folder folder = shellClass.NameSpace(Path.GetDirectoryName(sFile));
					FolderItem vItem = folder.ParseName(Path.GetFileName(sFile));
					for (int i = 0; i < 30; i++)
					{
						string detailsOf = folder.GetDetailsOf(vItem, i);
						DetailedFileInfo value = new DetailedFileInfo(i, detailsOf);
						arrayList.Add(value);
					}
				}
				catch (Exception)
				{
				}
			}
			return arrayList;
		}

		// Token: 0x0400004C RID: 76
		private string sFileName = "";

		// Token: 0x0400004D RID: 77
		private string sFullFileName = "";

		// Token: 0x0400004E RID: 78
		private string sFileExtension = "";

		// Token: 0x0400004F RID: 79
		private string sFilePath = "";

		// Token: 0x04000050 RID: 80
		private string sFileComment = "";

		// Token: 0x04000051 RID: 81
		private string sFileAuthor = "";

		// Token: 0x04000052 RID: 82
		private string sFileTitle = "";

		// Token: 0x04000053 RID: 83
		private string sFileSubject = "";

		// Token: 0x04000054 RID: 84
		private string sFileCategory = "";

		// Token: 0x04000055 RID: 85
		private string sFileType = "";

		// Token: 0x04000056 RID: 86
		private long lFileLength = 0L;

		// Token: 0x04000057 RID: 87
		private long lFileVersion = 0L;

		// Token: 0x04000058 RID: 88
		private DateTime dCreationDate;

		// Token: 0x04000059 RID: 89
		private DateTime dModificationDate;
	}
}
